import {genOption,  genPieOptionSerie} from "./utils";

// 服务器返回数据格式
export let responseData = {
  columns: ['月份', '女', '男', '总数'],
  records: [
    ['一月', 709, 327, 1036],
    ['二月', 1917, 1776, 3693],
    ['三月', 2455, 507, 2962],
    ['四月', 2610, 1200, 3810],
    ['五月', 1719, 800, 2519],
    ['六月', 1433, 482, 1915],
    ['七月', 1544, 204, 1748],
    ['八月', 3285, 1390, 4675],
    ['九月', 5208, 1001, 6209],
    ['十月', 3372, 951, 4323],
    ['十一月', 2484, 381, 2865],
    ['十二月', 4078, 220, 4298],
  ]
}

export let lineOption2 = genOption(responseData.records, responseData.columns)
// console.log(lineOption2)


// 选择第一列做legend 第二列做value
export let pieOption = genPieOptionSerie(responseData.records, {
  columnIndex: 0, dataIndex: 1
});

// console.log(pieOption)
